<!DOCTYPE html>
<html>
<head>
    {include file="public/header" /}
</head>
<body>
<div style="padding-bottom:200px" class="layui-form layuimini-form">

    <input type="hidden" name="id" value="{$res.fake_id}" />

    <div class="layui-form-item">
        <label class="layui-form-label required">类型</label>
        <div class="layui-input-block">
            <select name="category" lay-filter="category">
                <option {if condition="$res.cate==2"} selected {/if} value="2">积分</option>
                <option {if condition="$res.cate==1"} selected {/if} value="1">团队</option>
                <option {if condition="$res.cate==3"} selected {/if} value="3">收益</option>
                <option {if condition="$res.cate==4"} selected {/if} value="4">材料</option>
            </select>
        </div>
    </div>


    <div class="layui-form-item">
        <label class="layui-form-label required">名称</label>
        <div class="layui-input-block">
            <input type="text"  value="{$res.nickname}" name="nickname" lay-verify="required" lay-reqtext="名称不能为空" placeholder="请输入名称"  class="layui-input">
        </div>
    </div>

    {if condition="$res.fake_id"}
    <div class="layui-form-item thumb"  {if condition="$res.cate==1"} style="display: none" {/if}>
        <label class="layui-form-label">头像</label>
        <input type="hidden" id="imgurlHidden" name="thumb" value="{$res.thumb}">
        <div class="layui-input-inline uploadHeadImage">
            <div class="layui-upload-drag" id="headImg">
                <i class="layui-icon"></i>
                <p>点击上传图片，或将图片拖拽到此处</p>
            </div>
        </div>
        <div class="layui-input-inline">
            <div class="layui-upload-list" style="margin-top: 5px;">
                <img class="layui-upload-img headImage" style="height: 100px;" src="{$res.thumb}" id="imgurl">
                <p id="demoText"></p>
            </div>
        </div>
    </div>
    {else}
    <div class="layui-form-item thumb" {if condition="$res.cate==1"} style="display: none" {/if}>
        <label class="layui-form-label">头像</label>
        <input type="hidden" id="imgurlHidden" name="thumb">
        <div class="layui-input-inline uploadHeadImage">
            <div class="layui-upload-drag" id="headImg">
                <i class="layui-icon"></i>
                <p>点击上传图片，或将图片拖拽到此处</p>
            </div>
        </div>
        <div class="" style="display: flex">
            <div class="layui-upload-list" style="margin-top: 5px;">
                <img class="layui-upload-img headImage" style="height: 100px;" src="" id="imgurl">
                <p id="demoText"></p>
            </div>
            <div class="layui-form-mid layui-word-aux">
                <span class="x-red">*</span>为保证图片质量，缩略图请尽量选择200*200的方形图片,图片大小不要超过500KB,一般在30KB-100KB之间
            </div>
        </div>
    </div>
    {/if}

        <div class="layui-form-item team_numbers" {if condition="$res.cate!=1"}style="display: none"{/if}>
            <label class="layui-form-label required">团队人数</label>
            <div class="layui-input-block">
                <input type="number" id="team_numbers"   value="{$res.team_numbers}"   name="team_numbers" lay-verify="required" lay-reqtext="团队人数不能为空"    class="layui-input">
            </div>
        </div>

    <div class="layui-form-item">
        <label class="layui-form-label required">数量</label>
        <div class="layui-input-block">
            <input type="number" id="numbers"   value="{$res.numbers}"   name="numbers" lay-verify="required" lay-reqtext="数量不能为空"    class="layui-input">
        </div>
    </div>


    <div class="layui-form-item">
        <div class="layui-input-block">
            <button class="layui-btn layui-btn-normal" lay-submit lay-filter="saveBtn">确认保存</button>
        </div>
    </div>
    <!--</form>-->
</div>
{include file="public/footer" /}
<script src="/static/admin/ranking/saveinfo.js?v={$Think.const.TIMESTAMP}" charset="utf-8"></script>

</body>
</html>